Assymetric coherent caching for heterogeneous computing

ABSTRACT

A method of caching data in the memory of electronic processor units including compiling, in a first processor configured to perform data-parallel computation, a set of asymmetric coherent caching rules. The set rules configure the first processor to be: inoperable to cache, in a second level memory cache of the first electronic processor unit, data whose home location is in a final memory store of a second electronic processor unit; operable to cache, in the second level memory cache of the first electronic processor unit, the data whose home location is in a final memory store of the first electronic processor unit; and operable to cache, in a first level memory cache of the first electronic processor unit, the data, regardless of a home location of the data.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the benefit of U.S. Provisional Application Ser.No. 62/165,751, filed by John Danskin on May 22, 2015, entitled“ASSYMETRIC COHERENT CACHING FOR HETEROGENEOUS COMPUTING,” commonlyassigned with this application and incorporated herein by reference.

TECHNICAL FIELD

This application is directed, in general, to memory caching inelectronic processing units and, more specifically, to methods forasymmetric coherent caching and computing systems operable with suchmemory-cached electronic processing units.

BACKGROUND

To increase performance and reliability, multiprocessor systemstypically rely on cache coherence architectures to provide a consistentview of data stored in the separate cache memories of electronicprocessing units of the system. Present-day standards of cache coherencearchitectures often use protocols that are designed based on anassumption of electronic processing unit symmetry, meaning that all ofthe processing units of a multiprocessor systems have homogenouscomputing characteristics such as similar clock speeds and bandwidths.Cache coherent protocols that are based on such a symmetry assumptionapply the same caching protocol to all of the processing units. MOESI orMOI strategies, well known to those skilled in the pertinent art, areexamples of symmetric cache coherent protocols. A general principle ofsuch protocols is that data should be migrated to, and owned by, thememory cache of the processor that last used the data.

Problems can arise in the use of such symmetric cache coherent protocolsfor multiprocessor systems where the assumption of processor symmetrydoes not apply. For instance, a first processor having a high bandwidth(e.g., a data throughput), due to the ability to perform extensiveparallel processing on different portions of data, can greatly slow downthe computational speed of a second processor if the two processors aresharing some of the data according to a symmetric cache coherentprotocol.

SUMMARY

To mitigate these problems, one aspect provides a method of caching datain the memory of electronic processor units. The method can includecompiling, in a first electronic processor unit configured to performdata-parallel computations, a set of asymmetric coherent caching rules.The set of rules can configure the first electronic processor unit to beinoperable to cache, in a second level memory cache of the firstelectronic processor unit, data whose home location is in a final memorystore of a second electronic processor unit. The set of rules canconfigure the first electronic processor unit operable to cache, in thesecond level memory cache of the first electronic processor unit, thedata whose home location is in a final memory store of the firstelectronic processor unit. The set of rules can configure the firstelectronic processor unit to be operable to cache, in a first levelmemory cache of the first electronic processor unit, the data,regardless of a home location of the data.

Another aspect provides an electronic processing unit for data-parallelcomputation. The electronic processing unit can include a first levelmemory cache, a second level memory cache, a final memory store and amemory control circuit a memory control circuit compiled with a set ofasymmetric coherent caching rules. The set of rules can configure theelectronic processing unit to be inoperable to cache, in the secondlevel memory cache, data whose home location is in a final memory storeof a second electronic processing unit. The set of rules can configurethe electronic processing unit to be operable to cache, in the secondlevel memory cache, the data whose home location is in the final memorystore. The set of rules can configure the electronic processing unit tobe operable to cache, in the first level memory cache, the data,regardless of a home location of the data.

Another aspect provides a computing system for data-parallelcomputations comprising an electronic parallel processing unit. Theelectronic parallel processing unit can include a first level memorycache, a second level memory cache, a final memory store and a memorycontrol circuit compiled with the above-described set of asymmetriccoherent caching rules.

The foregoing has outlined preferred and alternative features of thepresent disclosure so that those skilled in the art may betterunderstand the detailed description of the disclosure that follows.Additional features of the disclosure will be described hereinafter thatform the subject of the claims of the disclosure. Those skilled in theart will appreciate that they can readily use the disclosed conceptionand specific embodiment as a basis for designing or modifying otherstructures for carrying out the same purposes of the present disclosure.

BRIEF DESCRIPTION

Reference is now made to the following descriptions taken in conjunctionwith the accompanying drawings, in which:

FIGS. 1A and 1B presents a flow diagram of example embodiments of amethod of caching data in the memory of electronic processor unitsaccording to the principles of the present disclosure.

FIG. 2 illustrates a block diagram of example embodiments of anelectronic processing unit for data-parallel computations constructedaccording to the principles of the present disclosure; and

FIG. 3 illustrates a block diagram of example embodiments of a computingsystem for data-parallel computations constructed according to theprinciples of the present disclosure.

DETAILED DESCRIPTION

The methods, processors and systems disclosed herein embody an asymmetrycache coherence architecture that use protocols based on an assumptionof heterogeneity between the electronic processing units of amultiprocessor system. In particular, a set of asymmetric coherentcaching rules disclosed herein can be implemented on a first electronicprocessor unit (e.g., a graphical processing unit, GPU) that can performa large number of parallel computations on data often at a slower ratethan a second electronic processor unit's computing rate (e.g., acentral processing unit, CPU). Implementation of the set of rules on thefirst electronic processor unit facilitates the second first electronicprocessor unit's ability to perform computations at or near its optimalspeed by avoiding or reducing latency.

The asymmetric coherent caching rules can help the second processor'scomputing speed to not be slowed down by delay times, or latency,associated with fetching data that otherwise, e.g., using symmetriccoherent caching rules, may be stored in the memory cache of the firstprocessor. The avoided latency associated with fetching data from thememory of the first processor back to the second processor could equalhundreds or thousand of clock cycles of the second processor, duringwhich time the second processor could be idling.

In accordance with the set of rules, because none of the data used bythe both the first and second processors are stored in the memory of thefirst processor, the first processor can be configured to fetch datafrom the memory of the second processor. Surprisingly, the delay timesor latency associated the first processor's fetching of data from thesecond processors memory are not substantially detrimental to firstprocessor's performance.

The first processor can be more tolerant than the second processor tothe latency associated with fetching because the first processor isconfigured to perform multiple data-parallel computations. During thelatency associated with fetching from the memory of the secondprocessor, the first processor can perform other data-parallelcomputations that do not require the particular data being fetched fromthe second processor. Additionally, to reduce the number of fetches, thefirst processor can be configured, according to the set of rules, tofetch and make a copy, in its own memory, data from the secondprocessor's memory.

Embodiments illustrating these and other features of asymmetric coherentcaching rules of the disclosure are presented below. FIGS. 1A and 1Bpresents a flow diagram of example embodiments of a method 100 ofcaching memory in electronic processing units according to theprinciples of the present disclosure. FIG. 2 illustrates a block diagramof example embodiments of an electronic processing unit 200 constructedaccording to the principles of the present disclosure. FIG. 3illustrates a block diagram of example embodiments of a computing system300 constructed according to the principles of the present disclosure.

One embodiment is a method of caching data in the memory of electronicprocessor units. Turning to FIGS. 1A and 1B, with continuing referenceto FIGS. 2-3, the method 100 comprises, in step 105, compiling, in afirst electronic processor unit 200 configured to perform data-parallelcomputation, a set of asymmetric coherent caching rules 205.

As illustrated in FIG. 2 the first processor unit 200 can comprise afirst level memory cache 210, a second level memory cache 215, a finalmemory store 220 and a memory control circuit 222 compiled with the setof rules 205.

The term, first level memory cache of the first electronic processorunit (e.g., first level memory cache 210 of the processor unit 200depicted in FIG. 2) as used herein, refers to random access memory (RAM)located on the first electronic processor unit (e.g., on-chip firstelectronic processor unit RAM) and directly connected to a core of thefirst electronic processor unit. The term, second level memory cache ofthe first electronic processor unit (e.g., second level memory cache 215of the processor unit 200 depicted in FIG. 2) as used herein, refers toon-chip first electronic processor unit RAM that is different than theon-chip first electronic processor unit RAM of the first level memorycache and is in data communication with the first level memory cache.The term, final memory store of the first electronic processor unit(e.g., final memory store 220 of the processor unit 200 depicted in FIG.2) as used herein, refers to RAM not located on the first electronicprocessor unit (e.g., off-chip first electronic processor unit RAM) noron the second electronic processor unit and in data communication withthe first electronic processor unit. One of ordinary skill in the artwould understand that first and second level memory caches areconfigured hold portions of data from the final memory store that hasrecently been used by the processor.

The set of rules 205 can configure the first electronic processor unit200, in step 110, inoperable to cache, in the second level memory cache215 of the first electronic processor unit 200, data 225 whose homelocation is in a final memory store of a second electronic processorunit (e.g., a final memory store 310 of the second processor unit 305depicted in FIG. 3).

The set of rules 205 can configure the first processor 200, in step 115,operable to cache, in the second level memory cache 215 of the firstelectronic processor unit 200, the data 225 whose home location is inthe final memory store 220 of the first electronic processor unit 200.

The set of rules 205 can configure the first processor 200, in step 120,operable to cache, in the first level memory cache 210 of the firstelectronic processor unit 200, the data 225, regardless of a homelocation of the data 225.

The term, final memory store of the second electronic processor unit asused herein, refers to off-chip second electronic processor unit RAM notlocated on the second electronic processor unit (e.g., processor unit305) nor on the first electronic processor unit (e.g., processor unit200) and in data communication with the second electronic processorunit.

The term, home location (or homed) as used herein, refers to a locationof a portion of the data in one of the final memory store of the firstelectronic processor unit (e.g., data 225 homed in final memory store220) or the final memory store of the second electronic processor unit(e.g., data 225 homed in final memory store 310).

One skilled in the art would understand that data is stored in computermemory in the form of cache lines where each cache line has a uniqueaddress, e.g., an address corresponding to a location of a portion ofthe data in the final memory store of the first electronic processorunit or in the final memory store of the second electronic processorunit. Thus data transiently located in a cache memory (e.g., cachememory of the first or second electronic processor unit) has anassociated address that points to a home location in one of the finalmemory store of the first electronic processor unit or in the finalmemory store of the second electronic processor unit.

In some embodiments, the method 100 further comprises, in step 125,compiling a software program 230 to run on the first electronicprocessor unit 200 in compliance with the set of asymmetric coherentcaching rules 205. As part of compiling the software program (step 125)the first electronic processor unit 200 can be can configured, in step130, to invalidate an unmodified portion of the data 225 in the firstlevel memory cache 210 of the first electronic processor unit 200 whenrequired by rules of data-race-free programing applied by the softwareprogram 230.

The term, invalidate an unmodified portion of the data as used herein,means clearing the unmodified portion of data from a first level memorycache 210 of an electronic processor unit (e.g., data 225 from the firstlevel memory cache 210 of the first electronic processor unit 200) aswell understood by those skilled in the pertinent art.

The term, data-race-free programing as used herein, refers tosynchronization rules implemented by software programs to forbid dataraces such as defined in Section 4 of “Weak Ordering: A New Definition”by Adve and Hill (ACM SIGARCH Computer Architecture News-Special Issue:Proceedings of the 17th annual international symposium on ComputerArchitecture, Volume 18 Issue 2SI, June 1990 Pages 2-14) which isincorporated by reference herein in its entirety.

In some embodiments, as part of compiling the software program (step125) the first electronic processor unit 200 can be can configured, instep 135, to write a portion of the data 225 back to home locations inthe final memory store 220 of the first electronic processor unit 200 orhome locations in the final memory store 310 of the second electronicprocessor unit 305, when the portion of the data 225 is modified by thesoftware program 230.

In some embodiments, as part of compiling the software program (step125) the first electronic processor unit 200 can be can configured, instep 140, to maintain a record of a portion of the data 215 which ishomed by the first electronic processor unit 200 and which is cached ina memory cache of the second electronic processor unit (e.g., memorycache 315 of the second electronic processor unit 305, depicted in FIG.3).

The term, memory cache of the second electronic processor unit as usedherein, refers to on-chip second electronic processor unit RAM locatedon the second electronic processor unit. The memory cache of the secondelectronic processor unit can include separate RAM corresponding tofirst, second, or lower, levels of memory caches on the secondelectronic processor unit.

In some embodiments, as part of compiling the software program (step125) the first electronic processor unit 200 can be can configured, instep 145, to request the second electronic processor unit 305 to forwarda copy of a portion of the data 215 that is modified by the softwareprogram 230, back to the first electronic processor unit 200 withoutflushing the modified portion of the data 215 from a memory cache of thesecond electronic processor unit (e.g., memory cache 315 of the secondelectronic processor unit 305 depicted in FIG. 3), where the portion ofthe data 215 is homed by the first electronic processor unit 200.

In some embodiments, as part of compiling the software program (step125) the first electronic processor unit 200 can be can configured, instep 150, to instruct the second electronic processor unit 305 to flusha portion of the data 215 from a memory cache of the second electronicprocessor unit (e.g., memory cache 315 of the second electronicprocessor unit 305 depicted in FIG. 3) when the software program 230causes the first electronic processor unit 200 to update the portion ofthe data 215, where the portion of the data 215 is homed by the firstelectronic processor unit 200.

The term, flush or flushing as used herein, means return the portion ofdata 215 to the first electronic processor unit 200, if modified, andinvalidate the portion of the data 215 in the memory cache 315 of thesecond electronic processor unit 305.

One skilled in the pertinent art would be familiar with how cache linesof data can be stored in data-line request tables. To facilitate theefficient execution of the set of asymmetric coherent caching rules 205,in some embodiments of the method 100 the set of asymmetric coherentcaching rules 205, when compiled in the first electronic processor unit200, further configures, in step 155, the first electronic processorunit 200 to be operable to consult a data-line request table 235 storedin the first electronic processor unit (e.g., stored in the memorycontrol circuit 222 of first electronic processor unit 200). As part ofstep 155, the set of asymmetric coherent caching rules 205 can furtherconfigure the first electronic processor unit 200, in step 160, to onlyread the portion of data stored in a memory cache (e.g., memory cache315) of the second electronic processor unit 305 if the portion of thedata 215 sought by the first electronic processor unit 200 is of recordin the data-line request table 235.

Another embodiment is an electronic processing unit for data-parallelcomputation. As illustrated in FIG. 2, with the electronic processingunit 200, comprising the first level memory cache 210, second levelmemory cache 215, final memory store 220 and memory control circuit 222.The memory control circuit 222 can be compiled with the set ofasymmetric coherent caching rules 205 such that the electronicprocessing unit 200 can be configured to perform in accordance withsteps 110, 115, 120 and 150 as described herein in the context of FIGS.1A and 1B. A software program 230 can be compiled to run on theprocessing unit 200 in compliance with the set of asymmetric coherentcaching rules 205 such that the processing unit 200 can be configured toperform in accordance with steps 125-145 as described herein in thecontext of FIGS. 1A and 1B.

In some embodiments, the electronic processing unit 200 is configured asa GPU. One skilled in the pertinent arts would be familiar with thecomponent parts of the GPU to facilitate performing data-parallelcomputations (e.g., load, store and texture operations) in softwareprograms 230 for, e.g., rendering graphical data and communicating withother processing units. Embodiments of the electronic processing unit200, however, are not limited to graphical processing configurations.For instance, the processing unit 200 may be configured for anynon-graphical or general purpose computing application that can takeadvantage of data-parallel algorithms to perform computations on data,involving matrix and vector operations.

Another embodiment is a computing system for data-parallel computations.Turning to FIG. 3, with continuing reference to FIGS. 1A-2, thecomputing system 300 comprises a first electronic processing unit 200configured to perform data-parallel computations in accordance with theset of asymmetric coherent caching rules 205 such as discussed herein inthe context of FIGS. 1A-2.

In some embodiments the system 300 further includes a second electronicprocessing unit 305, and a data interconnection link 320 configured totransfer the data 215 between the parallel processing unit 200 and thecentral processing unit 305. In some embodiments, the second electronicprocessing unit 315 can be configured as a CPU. Embodiment of the secondelectronic processing unit 305 can include a memory control circuit 340that is configured to track and cache data 225 in the final memory store310 and the memory cache 315 of the processing unit 305 in accordancewith the set of asymmetric coherent caching rules 205.

Those skilled in the art to which this application relates willappreciate that other and further additions, deletions, substitutionsand modifications may be made to the described embodiments.

What is claimed is:
 1. A method of caching data in the memory ofelectronic processor units, comprising: compiling, in a first electronicprocessor unit configured to perform data-parallel computations, a setof asymmetric coherent caching rules, wherein the set of rules configurethe first electronic processor unit to be: inoperable to cache, in asecond level memory cache of the first electronic processor unit, datawhose home location is in a final memory store of a second electronicprocessor unit, operable to cache, in the second level memory cache ofthe first electronic processor unit, the data whose home location is ina final memory store of the first electronic processor unit, andoperable to cache, in a first level memory cache of the first electronicprocessor unit, the data, regardless of a home location of the data. 2.The method of claim 1, compiling a software program to run on the firstelectronic processor unit in compliance with the set of asymmetriccoherent caching rules such that the first electronic processor unit isconfigured to invalidate an unmodified portion of the data in the firstlevel memory cache of the first electronic processor unit when requiredby rules of data-race-free programing applied by the software program.3. The method of claim 1, compiling a software program to run on thefirst electronic processor unit in compliance with the set of asymmetriccoherent caching rules such that the first level memory cache of thefirst electronic processor unit is configured to write a portion of thedata back to home locations in the final memory store of the firstelectronic processor unit or home locations in the final memory store ofthe second electronic processor unit, when the portion of the data ismodified by the software program.
 4. The method of claim 1, compiling asoftware program to run on the first electronic processor unit incompliance with the set of asymmetric coherent caching rules such thatthe first electronic processor unit maintains a record of a portion ofthe data which is homed by the first electronic processor unit and whichis cached in a memory cache of the second electronic processor unit. 5.The method of claim 1, compiling a software program to run on the firstelectronic processor unit in compliance with the set of asymmetriccoherent caching rules such that the first electronic processor unitrequests the second electronic processor unit to forward a copy of aportion of the data that is modified by the software program, back tothe first electronic processor unit without flushing the modifiedportion of the data from a memory cache of the second electronicprocessor unit, wherein the portion of the data is homed by the firstelectronic processor unit.
 6. The method of claim 1, compiling asoftware program to run on the first electronic processor unit incompliance with the set of asymmetric coherent caching rules such thatthe first electronic processor unit instructs the second electronicprocessor unit to flush a portion of the data from a memory cache of thesecond electronic processor unit when the software program causes thefirst electronic processor unit to update the portion of the data,wherein the portion of the data is homed by the first electronicprocessor unit.
 7. The method of claim 1, wherein the set of asymmetriccoherent caching rules, when compiled in the first electronic processorunit, further configures the first electronic processor unit to beoperable to consult a data-line request table stored in the firstelectronic processor unit and to only read a portion of the data storedin a memory cache of the second electronic processor unit if the portionof the data sought by the first electronic processor unit is of recordin the data-line request table.
 8. The method of claim 1, wherein thefirst electronic processor unit is a graphical processing unit and thesecond electronic processor unit is a central processing unit.
 9. Anelectronic processing unit for data-parallel computations, comprising: afirst level memory cache; a second level memory cache; a final memorystore; and a memory control circuit compiled with a set of asymmetriccoherent caching rules, wherein the set of rules configure theelectronic processing unit to be: inoperable to cache, in the secondlevel memory cache, data whose home location is in a final memory storeof a second electronic processing unit, operable to cache, in the secondlevel memory cache, the data whose home location is in the final memorystore, and operable to cache, in the first level memory cache, the data,regardless of a home location of the data.
 10. The unit of claim 9,further including a software program compiled to run on the electronicprocessing unit in compliance with the set of asymmetric coherentcaching rules such that the electronic processing unit is configured toinvalidate an unmodified portion of the data in the first level memorycache of the electronic processing unit when required by rules ofdata-race-free programing applied by the software program.
 11. The unitof claim 9, further including a software program compiled to run on theelectronic processing unit in compliance with the set of asymmetriccoherent caching rules such that the first level memory cache of theelectronic processing unit is configured to write a portion of the databack to home locations in the final memory story of the electronicprocessing unit or home locations in the final memory story of thesecond electronic processing unit, when the portion of the data ismodified by the software program.
 12. The unit of claim 9, furtherincluding a software program compiled to run on the electronicprocessing unit in compliance with the set of asymmetric coherentcaching rules such that the electronic processing unit is configured tomaintain a record of a portion of the data which is homed by theelectronic processing unit and which is cached in a memory cache of thesecond electronic processing unit.
 13. The unit of claim 9, furtherincluding a software program compiled to run on the electronicprocessing unit in compliance with the set of asymmetric coherentcaching rules such that the electronic processing unit is configured torequest the second electronic processing unit to forward a copy of aportion of the data that is modified by the software program, back tothe electronic processing unit without flushing the modified portion ofthe data from a memory cache of the second electronic processing unit,wherein the portion of the data is homed by the electronic processingunit.
 14. The unit of claim 9, further including a software programcompiled to run on the electronic processing unit in compliance with theset of asymmetric coherent caching rules such that the electronicprocessing unit is configured to instruct the second electronicprocessing unit to flush a portion of the data from a memory cache ofthe second electronic processing unit when the software program causesthe electronic processing unit to update the portion of the data,wherein the portion of the data is homed by the electronic processingunit.
 15. The unit of claim 9, further including a software programcompiled to run on the electronic processing unit in compliance with theset of asymmetric coherent caching rules such that the electronicprocessing unit is configured to be operable to consult a data-linerequest table stored in the electronic processing unit and to only reada portion of the data stored in a memory cache of the second processingunit if the portion of the data sought by the electronic processing unitis of record in the data-line request table.
 16. The unit of claim 9,wherein the first electronic processing unit is a graphical processingunit.
 17. The unit of claim 9, wherein the second electronic processingunit is a central processing unit.
 18. A computing system fordata-parallel computations, comprising: an electronic parallelprocessing unit, wherein the electronic parallel processing unitincludes: a first level memory cache; a second level memory cache; afinal memory store; and a memory control circuit compiled with a set ofasymmetric coherent caching rules, wherein the set of rules configurethe parallel processing unit to be: inoperable to cache, in the secondlevel memory cache, data whose home location is in a final memory storeof an electronic central processing unit, operable to cache in thesecond level memory cache, the data whose home location is in the finalmemory store of the parallel processing unit, and operable to cache, inthe first level memory cache, the data, regardless of a home location ofthe data.
 19. The system of claim 18, wherein a software programcompiled to run on the parallel processing unit and the centralprocessing unit in compliance with the set of asymmetric coherentcaching rules such that the parallel processing unit is configured toinstruct the central processing unit to flush a portion of the data froma memory cache of the central processing unit when the software programcauses the parallel processing unit to update the portion of the data,wherein the portion of the data is homed by the parallel processingunit.
 20. The system of claim 18, further including: the electroniccentral processing unit; and a data interconnection link configured totransfer the data between the parallel processing unit and the centralprocessing unit.